

#ifndef _WATER_H_
#define _WATER_H_

//#define     ADDWATERTIME					80   		//水泵进水8S
#define 	ADD_WATER_TIME2 				30         // 
#define     SYSTEMBEGINTIME                 2           //系统上电时间
#define     INSTEAMHEATPOWER                200        //蒸盘内圈功率 
#define     OUTSTEAMHEAT                    55        //蒸盘内圈功率
#define     OUTDISCHEAT                    	50        //上外加热盘
#define     INDISCHEAT                    	50        //上内加热盘

#define     SAMPLE_N                        5          //干烧检测为5秒温升，采用五次
#define     BOIL_TEMPTR_H                   128       //128
#define     BOIL_TEMPTR_H0                  115       //
#define     BTM_ERR_TEMPTR                  123

#define 	HEATER_ERR_TEMPTR   50
#define 	HEATER_ERR_TIME     60
#define 	HEATER_ERR_TIME1     120

#define 	ADD_WATER_DELAY 	40        //4秒
extern bool gb_WaterProcess;           		//进水处理
extern bool gb_TemptrDown;             		//进水温度下降
extern bool gb_DryFireFlag;
extern u8 gu8_AlarmSoundCnt;					//警报
extern u8 gu8_AddWaterTime1;            		//进水时间
extern u8 gu8_AddWaterTime2;             		//进水时间
extern u8 gu8_AddWaterDly;             		//延时干烧判断
extern u8 gu8_AddWatterheatdelay;
extern u8 gu8_AddWatterdelay;
extern u8 gu8_AddWaterCnt;
extern u8 gu8_FAdWdelay;
extern u8 look_setp1;
extern u16 look_temp;
extern u8 gu8_draintime;

void CheckAddWaterone(void);
void CheckAddWater2(void);
//#define ADDW_FIST     10 //首次加水
//#define ADDW_DOWN     20 //下降曲线
//#define ADDW_SPEC     30 //特殊曲线
//#define ADDW_HIGH     40 //上升曲线
//#define ADDW_HIGM     50 //大幅上升
//#define ADDW_MAX      60 //最大值加水

//typedef struct{
//	
//	  float  hotpan;//加热盘温度
//	
//	  float           last_hotpan;//
//      unsigned char   hot;
//	  unsigned char   on_f;		  //干烧加水标志
//	  unsigned char   temper_arry;//

//}HDTEMPER_T;

//typedef struct
//{
//	u8 on_f; //执行标志
//	u8 detect_sec; // 判断时间倒计时
//} FistAddw_t;

//extern FistAddw_t  fist_addw; // 首次加水判断
//extern HDTEMPER_T  addwCtrl;
//extern bool gb_Waterlack;  //
//extern bool gb_Firstaddw;  //

//extern bool   gb_InWatertwo ;
//extern bool   gb_InWater ;

//extern bool heat_advc_f; //
//extern u8 heat_allp_sec;

//extern u8 	prebomL;


//extern u8 		  stab_sec 		; 		// 稳定时间 max = 120


//extern u8         look_step1;
//extern u8     	  look_step2 ;


//extern u16 temper_buff[5] ;  //底盘温度
//extern u16 tempr_aver ;
//extern u8  tempr_cnt ; //平均个数
// 
//extern u16 temp; //调试用
//extern u8 dryTempr_max ; //干烧最大温度线
//extern bool   addw_two_f; //二次加水许可

//void process_water(void);//
//void process_DP(void);
//bool Add_water(u8 adtime);

//u8 get_tempr_stab(u8 set_level);
#endif
